package cn.kgc.billconsumer.controller;

import cn.kgc.billconsumer.feign.BillFeignClient;
import com.netflix.discovery.converters.Auto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName BillController
 * @Description TODO
 * @Author yaozhaobao
 * @Date 2021/1/22 14:03
 * @Version 1.0
 **/
@RestController
@RequestMapping("/api/bill")
public class BillController {

    @Autowired
    BillFeignClient billFeignClient;

    @RequestMapping("/add")
    public String addBill(){
        if(billFeignClient.addBill()>0){
            return  "添加订单成功";
        }else{
            return "添加订单失败";
        }
    }






}
